package com.gaojiawei.multiThread18_CompletableFutureTask;

import java.util.concurrent.CompletableFuture;

/**
 * 前置任务先执行，前置任务没有返回结果，后置任务没有返回结果
 */
public class L05_ThenRun {

    public static void main(String[] args) {
        testThenRun();
    }


    public static void testThenRun(){
        CompletableFuture.runAsync(()->{
            System.out.println("begin a");
            System.out.println("finish a");
        }).thenRun(()->{
            System.out.println("begin b");
            System.out.println("finish b");
        });
    }
}
